-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust: hooks: fix cross compilation #247442
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ofborg
bot
added
the
6.topic: cross-compilation
Building packages on a different platform than they will be used on
label
Aug 6, 2023
ghost
requested a review
from Artturin
August 6, 2023 03:28
ghost
linked an issue
Aug 6, 2023
that may be
closed
by this pull request
ghost
marked this pull request as draft
August 6, 2023 05:59
ghost
marked this pull request as ready for review
August 6, 2023 23:28
@ofborg build pkgsCross.aarch64-multiplatform.python3Packages.adblock |
🎉 🎉 🎉 pkgsCross.aarch64-multiplatform.python3Packages.adblock on x86_64-linux — Success 🎉 🎉 🎉 |
This was referenced Aug 26, 2023
alyssais
approved these changes
Sep 10, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I'd noticed this myself before, but tried and failed to fix it.
alyssais
added
the
2.status: merge conflict
This PR has merge conflicts with the target branch
label
Sep 10, 2023
delroth
added
the
12.approvals: 1
This PR was reviewed and approved by one reputable person
label
Sep 10, 2023
Looks good to me as well |
ghost
removed
the
2.status: merge conflict
This PR has merge conflicts with the target branch
label
Sep 25, 2023
Currently there is a state of severe confusion in pkgs/build-support/rust/hooks/ regarding host vs target; right now there is only "host" defined, but whether it means "host" or "target" seems to fluctuate. This commit corrects that, ensuring that all variables come in all three flavors (build, host, target) and are used consistently with the nixpkgs convention. This also fixes the cross-compilation of packages which use `maturinBuildHook` -- hooks go in `nativeBuildInputs` and are phase-shifted backwards by one platform, so they need to be careful about distinguishing between build and host. Closes #247441
alyssais
approved these changes
Sep 25, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
6.topic: cross-compilation
Building packages on a different platform than they will be used on
6.topic: rust
10.rebuild-darwin: 501+
10.rebuild-darwin: 5001+
10.rebuild-linux: 501+
10.rebuild-linux: 5001+
12.approvals: 1
This PR was reviewed and approved by one reputable person
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
Currently there is some confusion in
pkgs/build-support/rust/hooks/
regarding host vs target; right now there is only "host" defined, but whether it means "host" or "target" seems to fluctuate.This commit corrects that, ensuring that all variables come in all three flavors (build, host, target) and are used consistently with the nixpkgs convention.
This also fixes the cross-compilation of packages which use
maturinBuildHook
-- hooks go innativeBuildInputs
and are phase-shifted backwards by one platform, so to them thehostPlatform
looks like it is thetargetPlatform
.Closes #247441
Closes #251539
Things done